package com.sgb.kjwl.model.entity.pricecheck;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author Administrator
 * by 2021.03.17
 */
public class SupplierEntitiy implements Serializable {

    @SerializedName("no")
    private String no;
    @SerializedName("companyAddress")
    private String companyAddress;
    @SerializedName("provinceNo")
    private String provinceNo;
    @SerializedName("name")
    private String name;
    @SerializedName("mainBusiness")
    private String mainBusiness;
    /***
     *     修复1.3.6版本的BUG（由原来的privinceName改成provinceName后才能解析后端返回的值）
     */
    @SerializedName("provinceName")
    private String provinceName;
    @SerializedName("flag")
    private int flag;
    @SerializedName("isSelected")
    private boolean isSelected;

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getCompanyAddress() {
        return companyAddress;
    }

    public void setCompanyAddress(String companyAddress) {
        this.companyAddress = companyAddress;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMainBusiness() {
        return mainBusiness;
    }

    public void setMainBusiness(String mainBusiness) {
        this.mainBusiness = mainBusiness;
    }

    public String getProvinceNo() {
        return provinceNo;
    }

    public void setProvinceNo(String provinceNo) {
        this.provinceNo = provinceNo;
    }

    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    public String getPrivinceName() {
        return provinceName;
    }

    public void setPrivinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    @Override
    public String toString() {
        return "SupplierEntitiy{" +
                "no='" + no + '\'' +
                ", companyAddress='" + companyAddress + '\'' +
                ", provinceNo='" + provinceNo + '\'' +
                ", name='" + name + '\'' +
                ", mainBusiness='" + mainBusiness + '\'' +
                ", provinceName='" + provinceName + '\'' +
                ", flag=" + flag +
                ", isSelected=" + isSelected +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SupplierEntitiy that = (SupplierEntitiy) o;
        return flag == that.flag &&
                isSelected == that.isSelected &&
                Objects.equals(no, that.no) &&
                Objects.equals(companyAddress, that.companyAddress) &&
                Objects.equals(provinceNo, that.provinceNo) &&
                Objects.equals(name, that.name) &&
                Objects.equals(mainBusiness, that.mainBusiness) &&
                Objects.equals(provinceName, that.provinceName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(no, companyAddress, provinceNo, name, mainBusiness, provinceName, flag, isSelected);
    }
}
